﻿<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml"
xmlns="http://www.w3.org/TR/REC-html40">
	

<head>
<meta http-equiv=Content-Type content="text/html; charset=unicode">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 12">
<meta name=Originator content="Microsoft Word 12">
<link rel=File-List href="DataSyncHelp.files/filelist.xml">
<title>帮助文档</title>
<!--[if gte mso 9]><xml>
 <o:DocumentProperties>
  <o:Author>User</o:Author>
  <o:LastAuthor>User</o:LastAuthor>
  <o:Revision>2</o:Revision>
  <o:TotalTime>0</o:TotalTime>
  <o:Created>2013-09-03T05:42:00Z</o:Created>
  <o:LastSaved>2013-09-03T05:42:00Z</o:LastSaved>
  <o:Pages>7</o:Pages>
  <o:Words>1880</o:Words>
  <o:Characters>10716</o:Characters>
  <o:Lines>89</o:Lines>
  <o:Paragraphs>25</o:Paragraphs>
  <o:CharactersWithSpaces>12571</o:CharactersWithSpaces>
  <o:Version>12.00</o:Version>
 </o:DocumentProperties>
</xml><![endif]-->
<link rel=themeData href="DataSyncHelp.files/themedata.thmx">
<link rel=colorSchemeMapping href="DataSyncHelp.files/colorschememapping.xml">
<!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:Zoom>120</w:Zoom>
  <w:TrackMoves>false</w:TrackMoves>
  <w:TrackFormatting/>
  <w:ValidateAgainstSchemas/>
  <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
  <w:IgnoreMixedContent>false</w:IgnoreMixedContent>
  <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
  <w:DoNotPromoteQF/>
  <w:LidThemeOther>EN-US</w:LidThemeOther>
  <w:LidThemeAsian>ZH-CN</w:LidThemeAsian>
  <w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
  <w:Compatibility>
   <w:BreakWrappedTables/>
   <w:SnapToGridInCell/>
   <w:WrapTextWithPunct/>
   <w:UseAsianBreakRules/>
   <w:DontGrowAutofit/>
   <w:SplitPgBreakAndParaMark/>
   <w:DontVertAlignCellWithSp/>
   <w:DontBreakConstrainedForcedTables/>
   <w:DontVertAlignInTxbx/>
   <w:Word11KerningPairs/>
   <w:CachedColBalance/>
   <w:UseFELayout/>
  </w:Compatibility>
  <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
  <m:mathPr>
   <m:mathFont m:val="Cambria Math"/>
   <m:brkBin m:val="before"/>
   <m:brkBinSub m:val="&#45;-"/>
   <m:smallFrac m:val="off"/>
   <m:dispDef/>
   <m:lMargin m:val="0"/>
   <m:rMargin m:val="0"/>
   <m:defJc m:val="centerGroup"/>
   <m:wrapIndent m:val="1440"/>
   <m:intLim m:val="subSup"/>
   <m:naryLim m:val="undOvr"/>
  </m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
  DefSemiHidden="true" DefQFormat="false" DefPriority="99"
  LatentStyleCount="267">
  <w:LsdException Locked="false" Priority="0" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Normal"/>
  <w:LsdException Locked="false" Priority="9" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/>
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/>
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/>
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/>
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/>
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/>
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/>
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 1"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 2"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 3"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 4"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 5"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 6"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 7"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 8"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 9"/>
  <w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/>
  <w:LsdException Locked="false" Priority="10" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Title"/>
  <w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/>
  <w:LsdException Locked="false" Priority="11" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/>
  <w:LsdException Locked="false" Priority="22" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Strong"/>
  <w:LsdException Locked="false" Priority="20" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>
  <w:LsdException Locked="false" Priority="59" SemiHidden="false"
   UnhideWhenUsed="false" Name="Table Grid"/>
  <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>
  <w:LsdException Locked="false" Priority="1" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>
  <w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading"/>
  <w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List"/>
  <w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid"/>
  <w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1"/>
  <w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2"/>
  <w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1"/>
  <w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2"/>
  <w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1"/>
  <w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2"/>
  <w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3"/>
  <w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List"/>
  <w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading"/>
  <w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List"/>
  <w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid"/>
  <w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading Accent 1"/>
  <w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List Accent 1"/>
  <w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid Accent 1"/>
  <w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>
  <w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>
  <w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>
  <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>
  <w:LsdException Locked="false" Priority="34" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>
  <w:LsdException Locked="false" Priority="29" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Quote"/>
  <w:LsdException Locked="false" Priority="30" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>
  <w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>
  <w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>
  <w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>
  <w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>
  <w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List Accent 1"/>
  <w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>
  <w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List Accent 1"/>
  <w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>
  <w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading Accent 2"/>
  <w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List Accent 2"/>
  <w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid Accent 2"/>
  <w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>
  <w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>
  <w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>
  <w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>
  <w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>
  <w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>
  <w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>
  <w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List Accent 2"/>
  <w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>
  <w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List Accent 2"/>
  <w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>
  <w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading Accent 3"/>
  <w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List Accent 3"/>
  <w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid Accent 3"/>
  <w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>
  <w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>
  <w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>
  <w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>
  <w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>
  <w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>
  <w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>
  <w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List Accent 3"/>
  <w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>
  <w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List Accent 3"/>
  <w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>
  <w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading Accent 4"/>
  <w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List Accent 4"/>
  <w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid Accent 4"/>
  <w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>
  <w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>
  <w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>
  <w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>
  <w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>
  <w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>
  <w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>
  <w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List Accent 4"/>
  <w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>
  <w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List Accent 4"/>
  <w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>
  <w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading Accent 5"/>
  <w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List Accent 5"/>
  <w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid Accent 5"/>
  <w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>
  <w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>
  <w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>
  <w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>
  <w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>
  <w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>
  <w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>
  <w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List Accent 5"/>
  <w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>
  <w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List Accent 5"/>
  <w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>
  <w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading Accent 6"/>
  <w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List Accent 6"/>
  <w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid Accent 6"/>
  <w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>
  <w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>
  <w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>
  <w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>
  <w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>
  <w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>
  <w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>
  <w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List Accent 6"/>
  <w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>
  <w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List Accent 6"/>
  <w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>
  <w:LsdException Locked="false" Priority="19" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>
  <w:LsdException Locked="false" Priority="21" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>
  <w:LsdException Locked="false" Priority="31" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>
  <w:LsdException Locked="false" Priority="32" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>
  <w:LsdException Locked="false" Priority="33" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>
  <w:LsdException Locked="false" Priority="37" Name="Bibliography"/>
  <w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>
 </w:LatentStyles>
</xml><![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
	{font-family:宋体;
	panose-1:2 1 6 0 3 1 1 1 1 1;
	mso-font-alt:SimSun;
	mso-font-charset:134;
	mso-generic-font-family:auto;
	mso-font-pitch:variable;
	mso-font-signature:3 135135232 16 0 262145 0;}
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;
	mso-font-charset:1;
	mso-generic-font-family:roman;
	mso-font-format:other;
	mso-font-pitch:variable;
	mso-font-signature:0 0 0 0 0 0;}
@font-face
	{font-family:"\@宋体";
	panose-1:2 1 6 0 3 1 1 1 1 1;
	mso-font-charset:134;
	mso-generic-font-family:auto;
	mso-font-pitch:variable;
	mso-font-signature:3 135135232 16 0 262145 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{mso-style-unhide:no;
	mso-style-qformat:yes;
	mso-style-parent:"";
	margin:0cm;
	margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	font-family:宋体;
	mso-bidi-font-family:宋体;}
p
	{mso-style-priority:99;
	mso-margin-top-alt:auto;
	margin-right:0cm;
	mso-margin-bottom-alt:auto;
	margin-left:0cm;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	font-family:宋体;
	mso-bidi-font-family:宋体;}
p.style1, li.style1, div.style1
	{mso-style-name:style1;
	mso-style-unhide:no;
	mso-margin-top-alt:auto;
	margin-right:0cm;
	mso-margin-bottom-alt:auto;
	margin-left:0cm;
	mso-pagination:widow-orphan;
	font-size:24.0pt;
	font-family:宋体;
	mso-bidi-font-family:宋体;
	color:#0099FF;
	font-weight:bold;}
p.style8, li.style8, div.style8
	{mso-style-name:style8;
	mso-style-unhide:no;
	mso-margin-top-alt:auto;
	margin-right:0cm;
	mso-margin-bottom-alt:auto;
	margin-left:0cm;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	font-family:宋体;
	mso-bidi-font-family:宋体;
	color:#0099FF;
	font-weight:bold;}
p.style9, li.style9, div.style9
	{mso-style-name:style9;
	mso-style-unhide:no;
	mso-margin-top-alt:auto;
	margin-right:0cm;
	mso-margin-bottom-alt:auto;
	margin-left:0cm;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	font-family:宋体;
	mso-bidi-font-family:宋体;
	color:#0066FF;
	font-weight:bold;}
p.style11, li.style11, div.style11
	{mso-style-name:style11;
	mso-style-unhide:no;
	mso-margin-top-alt:auto;
	margin-right:0cm;
	mso-margin-bottom-alt:auto;
	margin-left:0cm;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	font-family:宋体;
	mso-bidi-font-family:宋体;
	color:black;
	font-weight:bold;}
span.style81
	{mso-style-name:style81;
	mso-style-unhide:no;
	color:#0099FF;
	font-weight:bold;}
span.style111
	{mso-style-name:style111;
	mso-style-unhide:no;
	color:black;
	font-weight:bold;}
span.style91
	{mso-style-name:style91;
	mso-style-unhide:no;
	color:#0066FF;
	font-weight:bold;}
.MsoChpDefault
	{mso-style-type:export-only;
	mso-default-props:yes;
	font-size:10.0pt;
	mso-ansi-font-size:10.0pt;
	mso-bidi-font-size:10.0pt;
	mso-ascii-font-family:"Times New Roman";
	mso-hansi-font-family:"Times New Roman";
	mso-font-kerning:0pt;}
@page WordSection1
	{size:595.3pt 841.9pt;
	margin:72.0pt 90.0pt 72.0pt 90.0pt;
	mso-header-margin:42.55pt;
	mso-footer-margin:49.6pt;
	mso-paper-source:0;}
div.WordSection1
	{page:WordSection1;}
-->
</style>
<!--[if gte mso 10]>
<style>
 /* Style Definitions */
 table.MsoNormalTable
	{mso-style-name:普通表格;
	mso-tstyle-rowband-size:0;
	mso-tstyle-colband-size:0;
	mso-style-noshow:yes;
	mso-style-priority:99;
	mso-style-qformat:yes;
	mso-style-parent:"";
	mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
	mso-para-margin:0cm;
	mso-para-margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
</style>
<![endif]--><!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="2050"/>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1"/>
 </o:shapelayout></xml><![endif]-->
</head>

	

<body lang=ZH-CN style='tab-interval:21.0pt'>

<div class=WordSection1>

<p align=center style='text-align:center'><b><span style='font-size:24.0pt;
color:#0099FF'>开发指南<span lang=EN-US><o:p></o:p></span></span></b></p>

<div align=center>

<table class=MsoNormalTable border=0 cellpadding=0 width=329 style='width:246.75pt;
 mso-cellspacing:1.5pt;background:#0099CC;mso-yfti-tbllook:1184'>
 <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes'>
  <td width=67 style='width:50.25pt;padding:.75pt .75pt .75pt .75pt'>
  <p class=MsoNormal>版本：</p>
  </td>
  <td width=252 style='width:189.0pt;padding:.75pt .75pt .75pt .75pt'>
  <p class=MsoNormal><span lang=EN-US>1.0.0</span></p>
  </td>
 </tr>
 <tr style='mso-yfti-irow:1;mso-yfti-lastrow:yes'>
  <td style='padding:.75pt .75pt .75pt .75pt'>
  <p class=MsoNormal>联系我：</p>
  </td>
  <td style='padding:.75pt .75pt .75pt .75pt'>
  <p class=MsoNormal><span lang=EN-US>huluwateam2013@gmail.com</span></p>
  </td>
 </tr>
</table>

</div>

<div>

<p>本文主要面向使用<span lang=EN-US>DateSync</span>的开发者，开发者可通过此文学习如何使用<span lang=EN-US>DateSync
SDK</span>进行开发。 </p>

<table class=MsoNormalTable border=0 cellpadding=0 width="100%"
 style='width:100.0%;mso-cellspacing:1.5pt;mso-yfti-tbllook:1184'>
 <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes'>
  <td style='padding:.75pt .75pt .75pt .75pt'>
  <p class=MsoNormal><span class=style81>开发环境</span></p>
  </td>
 </tr>
 <tr style='mso-yfti-irow:1'>
  <td style='padding:.75pt .75pt .75pt .75pt'>
  <p class=MsoNormal><span lang=EN-US>1.</span>安装<span lang=EN-US>Microsoft
  Visual C# 2008/2010 </span></p>
  </td>
 </tr>
 <tr style='mso-yfti-irow:2'>
  <td style='padding:.75pt .75pt .75pt .75pt'>
  <p class=MsoNormal><span lang=EN-US>2.</span>安装<span lang=EN-US>Microsoft
  .NET Framework 3.5 </span></p>
  </td>
 </tr>
 <tr style='mso-yfti-irow:3'>
  <td style='padding:.75pt .75pt .75pt .75pt'>
  <p class=MsoNormal><span lang=EN-US>3.</span>请将以下<span lang=EN-US>DLL</span>文件加入到项目中<span
  lang=EN-US>(</span>以下文件位于<span lang=EN-US>DataSyncSDK</span>安装路径下<span
  lang=EN-US>)</span></p>
  </td>
 </tr>
 <tr style='mso-yfti-irow:4'>
  <td style='padding:.75pt .75pt .75pt .75pt'>
  <table class=MsoNormalTable border=0 cellpadding=0 width="100%"
   style='width:100.0%;mso-cellspacing:1.5pt;mso-yfti-tbllook:1184'>
   <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes'>
    <td width=404 style='width:303.0pt;padding:.75pt .75pt .75pt .75pt'>
    <p class=MsoNormal><span class=style111><span lang=EN-US>DLL</span>文件：</span></p>
    </td>
   </tr>
   <tr style='mso-yfti-irow:1'>
    <td style='padding:.75pt .75pt .75pt .75pt'>
    <p class=MsoNormal><span lang=EN-US>agsXMPP.dll</span></p>
    </td>
   </tr>
   <tr style='mso-yfti-irow:2'>
    <td style='padding:.75pt .75pt .75pt .75pt'>
    <p class=MsoNormal><span lang=EN-US>CE.iPhone.PList.dll</span></p>
    </td>
   </tr>
   <tr style='mso-yfti-irow:3'>
    <td style='padding:.75pt .75pt .75pt .75pt'>
    <p class=MsoNormal><span lang=EN-US>DataSync.dll</span></p>
    </td>
   </tr>
   <tr style='mso-yfti-irow:4'>
    <td style='padding:.75pt .75pt .75pt .75pt'>
    <p class=MsoNormal><span lang=EN-US>log4net.dll</span></p>
    </td>
   </tr>
   <tr style='mso-yfti-irow:5;mso-yfti-lastrow:yes'>
    <td style='padding:.75pt .75pt .75pt .75pt'>
    <p class=MsoNormal><span lang=EN-US>Newtonsoft.Json.dll</span></p>
    </td>
   </tr>
  </table>
  </td>
 </tr>
 <tr style='mso-yfti-irow:5;mso-yfti-lastrow:yes'>
  <td style='padding:.75pt .75pt .75pt .75pt'>
  <p class=MsoNormal><span lang=EN-US>&nbsp;</span></p>
  </td>
 </tr>
</table>

</div>

<table class=MsoNormalTable border=0 cellpadding=0 width="100%"
 style='width:100.0%;mso-cellspacing:1.5pt;mso-yfti-tbllook:1184'>
 <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes'>
  <td colspan=2 style='background:white;padding:.75pt .75pt .75pt .75pt'>
  <p class=MsoNormal><span class=style81>主要类介绍</span></p>
  </td>
 </tr>
 <tr style='mso-yfti-irow:1'>
  <td width="13%" style='width:13.0%;background:white;padding:.75pt .75pt .75pt .75pt'>
  <p class=MsoNormal><strong><span style='font-family:宋体;mso-bidi-font-family:
  宋体'>名称</span></strong></p>
  </td>
  <td width="87%" style='width:87.0%;background:white;padding:.75pt .75pt .75pt .75pt'>
  <p class=MsoNormal><strong><span style='font-family:宋体;mso-bidi-font-family:
  宋体'>说明</span></strong></p>
  </td>
 </tr>
 <tr style='mso-yfti-irow:2'>
  <td style='background:white;padding:.75pt .75pt .75pt .75pt'>
  <p class=MsoNormal><span lang=EN-US>DataSyncObject</span></p>
  </td>
  <td style='background:white;padding:.75pt .75pt .75pt .75pt'>
  <p class=MsoNormal><span lang=EN-US>DateSync SDK</span>的核心类，通过调用该类中的<span
  lang=EN-US>login,put,get,delete</span>等方法实现在<span lang=EN-US>icloud</span>中对联系人，相片流等功能进行操作。</p>
  </td>
 </tr>
 <tr style='mso-yfti-irow:3;mso-yfti-lastrow:yes'>
  <td style='padding:.75pt .75pt .75pt .75pt'>
  <p class=MsoNormal><span lang=EN-US>Context</span></p>
  </td>
  <td style='padding:.75pt .75pt .75pt .75pt'>
  <p class=MsoNormal><span lang=EN-US>DataSyncObject</span>类中的方法参数都通过该类传入值，传出处理结果。</p>
  </td>
 </tr>
</table>

<p class=MsoNormal><span lang=EN-US style='display:none;mso-hide:all'><o:p>&nbsp;</o:p></span></p>

<table class=MsoNormalTable border=0 cellpadding=0 width="100%"
 style='width:100.0%;mso-cellspacing:1.5pt;mso-yfti-tbllook:1184'>
 <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes'>
  <td style='background:white;padding:.75pt .75pt .75pt .75pt'>
  <p class=MsoNormal><strong><span style='font-family:宋体;mso-bidi-font-family:
  宋体'>如何使用<span lang=EN-US>DataSync SDK</span></span></strong><span lang=EN-US>
  </span></p>
  </td>
 </tr>
 <tr style='mso-yfti-irow:1'>
  <td style='padding:.75pt .75pt .75pt .75pt'>
  <p>首先导入<span lang=EN-US>DataSync.dll</span>文件到工程中</p>
  <p><strong><span lang=EN-US style='font-family:宋体;mso-bidi-font-family:宋体'>1.</span></strong><strong><span
  style='font-family:宋体;mso-bidi-font-family:宋体'>用户登陆</span></strong></p>
  <p><span lang=EN-US>using DataSync;</span></p>
  <p><span lang=EN-US>static void Main()<br>
  {</span></p>
  <p><span lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;DataSyncObject ds = new
  DataSyncObject();//</span>创建<span lang=EN-US>DataSyncObject</span>对像<span
  lang=EN-US><br>
  &nbsp;&nbsp;&nbsp;&nbsp;ds.gIcloud = new Cloud();//</span>生成<span lang=EN-US>gIcloud</span>对像</p>
  <p class=MsoNormal><span lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Context
  loginctx = new Context();//</span>生成<span lang=EN-US>Context</span>对像<span
  lang=EN-US><br>
  &nbsp;&nbsp;&nbsp;&nbsp;loginctx.loginUsername = &quot;apple id &quot;;//</span>输入<span
  lang=EN-US>icoud </span>帐号<span lang=EN-US> <br>
  &nbsp;&nbsp;&nbsp;&nbsp;loginctx.loginPassword = &quot;password&quot;;//</span>输入<span
  lang=EN-US>icoud </span>帐号密码<span lang=EN-US> <br>
  &nbsp;&nbsp;&nbsp;&nbsp;loginctx.modeType = Context.ICLOUD_MODE;//</span>输入<span
  lang=EN-US>Context</span>参数的模块类型，当前设为登陆到<span lang=EN-US>icloud</span>服务器上<span
  lang=EN-US><br>
  &nbsp;&nbsp;&nbsp;&nbsp;bool ret = ds.<span class=style81>login</span>(loginctx);//</span>登陆<span
  lang=EN-US>icoud</span>，成功返回<span lang=EN-US>true,</span>失败返回<span
  lang=EN-US>false;<br>
  &nbsp;&nbsp;&nbsp;&nbsp;if (ret == false)<br>
  &nbsp;&nbsp;&nbsp;&nbsp; {<br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return;<br>
  &nbsp;&nbsp;&nbsp;&nbsp; } </span></p>
  <p><span lang=EN-US>}</span></p>
  <p><span lang=EN-US>&nbsp;</span></p>
  </td>
 </tr>
 <tr style='mso-yfti-irow:2'>
  <td style='padding:.75pt .75pt .75pt .75pt'>
  <p><strong><span lang=EN-US style='font-family:宋体;mso-bidi-font-family:宋体'>2.</span></strong><strong><span
  style='font-family:宋体;mso-bidi-font-family:宋体'>相片下载</span></strong></p>
  <p><span lang=EN-US>using DataSync;</span></p>
  <p class=MsoNormal><span lang=EN-US>//</span>进度条回调函数<span lang=EN-US><br>
  //</span>参数：<span lang=EN-US>transfered</span>已传输字节数，<span lang=EN-US> total </span>表示总字节数<span
  lang=EN-US><br>
  //</span>返回值：<span lang=EN-US> true:</span>中断传输，<span lang=EN-US>false:</span>继续传输
  </p>
  <p><span lang=EN-US>public static bool TransferProgress(int transfered,int
  total)<br>
  {<br>
  <br>
  return false;<br>
  }</span></p>
  <p><span lang=EN-US>static void Main()<br>
  { </span></p>
  <p><span lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;DataSyncObject ds = new
  DataSyncObject();//</span>创建<span lang=EN-US>DataSyncObject</span>对像<span
  lang=EN-US><br>
  &nbsp;&nbsp;&nbsp;&nbsp;ds.gIcloud = new Cloud();//</span>生成<span lang=EN-US>gIcloud</span>对像</p>
  <p class=MsoNormal><span lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Context
  loginctx = new Context();//</span>生成<span lang=EN-US>Context</span>对像<span
  lang=EN-US><br>
  &nbsp;&nbsp;&nbsp;&nbsp;loginctx.loginUsername = &quot;apple id &quot;;//</span>输入<span
  lang=EN-US>icoud </span>帐号<span lang=EN-US> <br>
  &nbsp;&nbsp;&nbsp;&nbsp;loginctx.loginPassword = &quot;password&quot;;//</span>输入<span
  lang=EN-US>icoud </span>帐号密码<span lang=EN-US> <br>
  &nbsp;&nbsp;&nbsp;&nbsp;loginctx.modeType = Context.ICLOUD_MODE;//</span>输入<span
  lang=EN-US>Context</span>参数的模块类型，当前设为登陆到<span lang=EN-US>icloud</span>服务器上<span
  lang=EN-US><br>
  &nbsp;&nbsp;&nbsp;&nbsp;bool ret = ds.<span class=style81>login</span>(loginctx);//</span>登陆<span
  lang=EN-US>icoud</span>，成功返回<span lang=EN-US>true,</span>失败返回<span
  lang=EN-US>false;<br>
  &nbsp;&nbsp;&nbsp;&nbsp;if (ret == false)<br>
  &nbsp;&nbsp;&nbsp;&nbsp; {<br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return;<br>
  &nbsp;&nbsp;&nbsp;&nbsp; }</span></p>
  <p class=MsoNormal><span lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;</span></p>
  <p><span lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;//</span>登陆后，便可以下载相片</p>
  <p><span lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;Context getctx ;<br>
  &nbsp;&nbsp;&nbsp;&nbsp;List&lt;FileNode&gt; files =
  ds.gIcloud.getPhotoList();//</span>登陆成功后，通过该方法取得需要下载的文件列表<span lang=EN-US><br>
  &nbsp;&nbsp;&nbsp;&nbsp;foreach (FileNode item in files)<br>
  &nbsp;&nbsp;&nbsp;&nbsp;{<br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;getctx = new Context();<br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;getctx.transferProgresscallback
  = new TransferProgressCallBack(TransferProgress);//</span>进度条回调接口<span
  lang=EN-US><br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;getctx.modeType =
  Context.ICLOUD_PS_MODE;//</span>指定要操作的模块为相片流模块<span lang=EN-US><br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;getctx.inItem = item;//</span>要下载的文件节点<span
  lang=EN-US><br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ds.<span class=style81>get</span>(getctx);//</span>下载文件<span
  lang=EN-US><br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (getctx.outItem != null)<br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Console.Write(&quot;\n\n
  file &quot; + getctx.outItem.filename + &quot;down success.&quot;);<br>
  &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;}<br>
  &nbsp;&nbsp;&nbsp;&nbsp;}<br>
  }</span></p>
  </td>
 </tr>
 <tr style='mso-yfti-irow:3'>
  <td style='padding:.75pt .75pt .75pt .75pt'>
  <p><strong><span lang=EN-US style='font-family:宋体;mso-bidi-font-family:宋体'>3.</span></strong><strong><span
  style='font-family:宋体;mso-bidi-font-family:宋体'>上传相片</span></strong></p>
  <p><span lang=EN-US>using DataSync;</span></p>
  <p class=MsoNormal><span lang=EN-US>//</span>进度条回调函数<span lang=EN-US><br>
  //</span>参数：<span lang=EN-US>transfered</span>已传输字节数，<span lang=EN-US> total </span>表示总字节数<span
  lang=EN-US><br>
  //</span>返回值：<span lang=EN-US> true:</span>中断传输，<span lang=EN-US>false:</span>继续传输
  </p>
  <p><span lang=EN-US>public static bool TransferProgress(int transfered,int
  total)<br>
  {<br>
  <br>
  return false;<br>
  }</span></p>
  <p><span lang=EN-US>static void Main()<br>
  { </span></p>
  <p><span lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;DataSyncObject ds = new
  DataSyncObject();//</span>创建<span lang=EN-US>DataSyncObject</span>对像<span
  lang=EN-US><br>
  &nbsp;&nbsp;&nbsp;&nbsp;ds.gIcloud = new Cloud();//</span>生成<span lang=EN-US>gIcloud</span>对像</p>
  <p class=MsoNormal><span lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  &nbsp;&nbsp;&nbsp;&nbsp;Context loginctx = new Context();//</span>生成<span
  lang=EN-US>Context</span>对像<span lang=EN-US><br>
  &nbsp;&nbsp;&nbsp;&nbsp;loginctx.loginUsername = &quot;apple id &quot;;//</span>输入<span
  lang=EN-US>icoud </span>帐号<span lang=EN-US> <br>
  &nbsp;&nbsp;&nbsp;&nbsp;loginctx.loginPassword = &quot;password&quot;;//</span>输入<span
  lang=EN-US>icoud </span>帐号密码<span lang=EN-US> <br>
  &nbsp;&nbsp;&nbsp;&nbsp;loginctx.modeType = Context.ICLOUD_MODE;//</span>输入<span
  lang=EN-US>Context</span>参数的模块类型，当前设为登陆到<span lang=EN-US>icloud</span>服务器上<span
  lang=EN-US><br>
  &nbsp;&nbsp;&nbsp;&nbsp;bool ret = ds.<span class=style81>login</span>(loginctx);//</span>登陆<span
  lang=EN-US>icoud</span>，成功返回<span lang=EN-US>true,</span>失败返回<span
  lang=EN-US>false;<br>
  &nbsp;&nbsp;&nbsp;&nbsp;if (ret == false)<br>
  &nbsp;&nbsp;&nbsp;&nbsp; {<br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return;<br>
  &nbsp;&nbsp;&nbsp;&nbsp; } </span></p>
  <p class=MsoNormal><span lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp; </span></p>
  <p><span lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;//</span>登陆后，便可以上传相片</p>
  <p><span lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;Context putctx = new Context();<br>
  &nbsp;&nbsp;&nbsp;&nbsp;putctx.transferProgresscallback = new TransferProgressCallBack(TransferProgress);<br>
  &nbsp;&nbsp;&nbsp;&nbsp;putctx.srcFileFullName =
  &quot;e:/ndphoto/IMG_0255.JPG&quot;;//</span>指定要上传的文件<span lang=EN-US><br>
  &nbsp;&nbsp;&nbsp;&nbsp;putctx.modeType = Context.ICLOUD_PS_MODE;<br>
  &nbsp;&nbsp;&nbsp;&nbsp;ret = ds.<span class=style81>put</span>(putctx); //</span>上传一张相片，最大不能超过<span
  lang=EN-US>50M<br>
  &nbsp;&nbsp;&nbsp;&nbsp;if (ret)<br>
  &nbsp;&nbsp;&nbsp;&nbsp;{<br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Console.Write(&quot;\n\n file
  put success. &quot;);<br>
  &nbsp;&nbsp;&nbsp;&nbsp;}</span></p>
  <p><span lang=EN-US>}</span></p>
  </td>
 </tr>
 <tr style='mso-yfti-irow:4'>
  <td style='padding:.75pt .75pt .75pt .75pt'>
  <p><strong><span lang=EN-US style='font-family:宋体;mso-bidi-font-family:宋体'>4.</span></strong><strong><span
  style='font-family:宋体;mso-bidi-font-family:宋体'>删除图片</span></strong></p>
  <p><span lang=EN-US>using DataSync;</span></p>
  <p><span lang=EN-US>static void Main()<br>
  {</span></p>
  <p><span lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;DataSyncObject ds = new
  DataSyncObject();//</span>创建<span lang=EN-US>DataSyncObject</span>对像<span
  lang=EN-US><br>
  &nbsp;&nbsp;&nbsp;&nbsp;ds.gIcloud = new Cloud();//</span>生成<span lang=EN-US>gIcloud</span>对像</p>
  <p><span lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;Context loginctx = new
  Context();//</span>生成<span lang=EN-US>Context</span>对像<span lang=EN-US><br>
  &nbsp;&nbsp;&nbsp;&nbsp;loginctx.loginUsername = &quot;apple id &quot;;//</span>输入<span
  lang=EN-US>icoud </span>帐号<span lang=EN-US> <br>
  &nbsp;&nbsp;&nbsp;&nbsp;loginctx.loginPassword = &quot;password&quot;;//</span>输入<span
  lang=EN-US>icoud </span>帐号密码<span lang=EN-US> <br>
  &nbsp;&nbsp;&nbsp;&nbsp;loginctx.modeType = Context.ICLOUD_MODE;//</span>输入<span
  lang=EN-US>Context</span>参数的模块类型，当前设为登陆到<span lang=EN-US>icloud</span>服务器上<span
  lang=EN-US><br>
  &nbsp;&nbsp;&nbsp;&nbsp;bool ret = ds.<span class=style81>login</span>(loginctx);//</span>登陆<span
  lang=EN-US>icoud</span>，成功返回<span lang=EN-US>true,</span>失败返回<span
  lang=EN-US>false;<br>
  &nbsp;&nbsp;&nbsp;&nbsp;if (ret == false)<br>
  &nbsp;&nbsp;&nbsp;&nbsp; {<br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return;<br>
  &nbsp;&nbsp;&nbsp;&nbsp; } </span></p>
  <p><span lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;Context delctx = new Context();<br>
  &nbsp;&nbsp;&nbsp;&nbsp;delctx.srcFileFullName =
  &quot;e:/ndphoto/IMG_0260.JPG&quot;;//</span>要删除的图片<span lang=EN-US><br>
  &nbsp;&nbsp;&nbsp;&nbsp;delctx.modeType = Context.ICLOUD_PS_MODE;<br>
  &nbsp;&nbsp;&nbsp;&nbsp;ret = ds.<span class=style81>delete</span>(delctx);
  //</span>删除图片<span lang=EN-US><br>
  &nbsp;&nbsp;&nbsp;&nbsp;if (ret)<br>
  &nbsp;&nbsp;&nbsp;&nbsp;{<br>
  &nbsp;&nbsp;&nbsp;&nbsp;Console.Write(&quot;\n\n file delete success.
  &quot;);<br>
  &nbsp;&nbsp;&nbsp;&nbsp;} </span></p>
  <p><span lang=EN-US>}</span></p>
  </td>
 </tr>
 <tr style='mso-yfti-irow:5'>
  <td style='padding:.75pt .75pt .75pt .75pt'>
  <p><strong><span lang=EN-US style='font-family:宋体;mso-bidi-font-family:宋体'>5.</span></strong><strong><span
  style='font-family:宋体;mso-bidi-font-family:宋体'>获取所有联系人列表</span></strong></p>
  <p><span lang=EN-US>using DataSync;</span></p>
  <p><span lang=EN-US>static void Main()<br>
  {</span></p>
  <p><span lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;DataSyncObject ds = new
  DataSyncObject();//</span>创建<span lang=EN-US>DataSyncObject</span>对像<span
  lang=EN-US><br>
  &nbsp;&nbsp;&nbsp;&nbsp;ds.gIcloud = new Cloud();//</span>生成<span lang=EN-US>gIcloud</span>对像</p>
  <p><span lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;Context loginctx = new
  Context();//</span>生成<span lang=EN-US>Context</span>对像<span lang=EN-US><br>
  &nbsp;&nbsp;&nbsp;&nbsp;loginctx.loginUsername = &quot;apple id &quot;;//</span>输入<span
  lang=EN-US>icoud </span>帐号<span lang=EN-US> <br>
  &nbsp;&nbsp;&nbsp;&nbsp;loginctx.loginPassword = &quot;password&quot;;//</span>输入<span
  lang=EN-US>icoud </span>帐号密码<span lang=EN-US> <br>
  &nbsp;&nbsp;&nbsp;&nbsp;loginctx.modeType = Context.ICLOUD_MODE;//</span>输入<span
  lang=EN-US>Context</span>参数的模块类型，当前设为登陆到<span lang=EN-US>icloud</span>服务器上<span
  lang=EN-US><br>
  &nbsp;&nbsp;&nbsp;&nbsp;bool ret = ds.<span class=style81>login</span>(loginctx);//</span>登陆<span
  lang=EN-US>icoud</span>，成功返回<span lang=EN-US>true,</span>失败返回<span
  lang=EN-US>false;<br>
  &nbsp;&nbsp;&nbsp;&nbsp;if (ret == false)<br>
  &nbsp;&nbsp;&nbsp;&nbsp; {<br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return;<br>
  &nbsp;&nbsp;&nbsp;&nbsp; }</span></p>
  <p><span lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;Context ctx = new Context();<br>
  &nbsp;&nbsp;&nbsp;&nbsp;ctx.modeType = Context.ICLOUD_CONTACT_MODE;<br>
  &nbsp;&nbsp;&nbsp;&nbsp;ds.<span class=style91>get</span>(ctx);//</span>结果存在<span
  lang=EN-US>ctx.outContactList</span>中<span lang=EN-US><br>
  &nbsp;&nbsp;&nbsp;&nbsp;List&lt;Contact&gt; contactList = ctx.outContactList;
  </span></p>
  <p><span lang=EN-US>}</span></p>
  <p><span lang=EN-US>&nbsp;</span></p>
  </td>
 </tr>
 <tr style='mso-yfti-irow:6'>
  <td style='padding:.75pt .75pt .75pt .75pt'>
  <p><strong><span lang=EN-US style='font-family:宋体;mso-bidi-font-family:宋体'>6.</span></strong><strong><span
  style='font-family:宋体;mso-bidi-font-family:宋体'>删除所有联系人</span></strong></p>
  <p><span lang=EN-US>using DataSync;</span></p>
  <p><span lang=EN-US>static void Main()<br>
  {</span></p>
  <p><span lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;DataSyncObject ds = new
  DataSyncObject();//</span>创建<span lang=EN-US>DataSyncObject</span>对像<span
  lang=EN-US><br>
  &nbsp;&nbsp;&nbsp;&nbsp;ds.gIcloud = new Cloud();//</span>生成<span lang=EN-US>gIcloud</span>对像</p>
  <p><span lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;Context loginctx = new
  Context();//</span>生成<span lang=EN-US>Context</span>对像<span lang=EN-US><br>
  &nbsp;&nbsp;&nbsp;&nbsp;loginctx.loginUsername = &quot;apple id &quot;;//</span>输入<span
  lang=EN-US>icoud </span>帐号<span lang=EN-US> <br>
  &nbsp;&nbsp;&nbsp;&nbsp;loginctx.loginPassword = &quot;password&quot;;//</span>输入<span
  lang=EN-US>icoud </span>帐号密码<span lang=EN-US> <br>
  &nbsp;&nbsp;&nbsp;&nbsp;loginctx.modeType = Context.ICLOUD_MODE;//</span>输入<span
  lang=EN-US>Context</span>参数的模块类型，当前设为登陆到<span lang=EN-US>icloud</span>服务器上<span
  lang=EN-US><br>
  &nbsp;&nbsp;&nbsp;&nbsp;bool ret = ds.<span class=style81>login</span>(loginctx);//</span>登陆<span
  lang=EN-US>icoud</span>，成功返回<span lang=EN-US>true,</span>失败返回<span
  lang=EN-US>false;<br>
  &nbsp;&nbsp;&nbsp;&nbsp;if (ret == false)<br>
  &nbsp;&nbsp;&nbsp;&nbsp; {<br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return;<br>
  &nbsp;&nbsp;&nbsp;&nbsp; }</span></p>
  <p class=MsoNormal><span lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;ICloudContact
  iCloudContact = ds.icloud.GetContacts(); &nbsp;<br>
  &nbsp;&nbsp;&nbsp;&nbsp;Context ctx = new Context(); <br>
  &nbsp;&nbsp;&nbsp;&nbsp;ctx.contactList = iCloudContact.contacts; <br>
  &nbsp;&nbsp;&nbsp;&nbsp;ctx.modeType = Context.ICLOUD_CONTACT_MODE;
  &nbsp;&nbsp;&nbsp;&nbsp;<br>
  &nbsp;&nbsp;&nbsp;&nbsp;ds.<span class=style81>delete</span>(ctx);//</span>删除所有联系人<span
  lang=EN-US><br>
  &nbsp;&nbsp;&nbsp;&nbsp;List&lt;Contact&gt; contactList = ctx.outContactList;
  </span></p>
  <p><span lang=EN-US>}</span></p>
  </td>
 </tr>
 <tr style='mso-yfti-irow:7'>
  <td style='padding:.75pt .75pt .75pt .75pt'>
  <p><strong><span lang=EN-US style='font-family:宋体;mso-bidi-font-family:宋体'>7.</span></strong><strong><span
  style='font-family:宋体;mso-bidi-font-family:宋体'>增加联系人</span></strong></p>
  <p><span lang=EN-US>using DataSync;</span></p>
  <p><span lang=EN-US>static void Main()<br>
  {</span></p>
  <p><span lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;DataSyncObject ds = new
  DataSyncObject();//</span>创建<span lang=EN-US>DataSyncObject</span>对像<span
  lang=EN-US><br>
  &nbsp;&nbsp;&nbsp;&nbsp;ds.gIcloud = new Cloud();//</span>生成<span lang=EN-US>gIcloud</span>对像</p>
  <p><span lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;Context loginctx = new
  Context();//</span>生成<span lang=EN-US>Context</span>对像<span lang=EN-US><br>
  &nbsp;&nbsp;&nbsp;&nbsp;loginctx.loginUsername = &quot;apple id &quot;;//</span>输入<span
  lang=EN-US>icoud </span>帐号<span lang=EN-US> <br>
  &nbsp;&nbsp;&nbsp;&nbsp;loginctx.loginPassword = &quot;password&quot;;//</span>输入<span
  lang=EN-US>icoud </span>帐号密码<span lang=EN-US> <br>
  &nbsp;&nbsp;&nbsp;&nbsp;loginctx.modeType = Context.ICLOUD_MODE;//</span>输入<span
  lang=EN-US>Context</span>参数的模块类型，当前设为登陆到<span lang=EN-US>icloud</span>服务器上<span
  lang=EN-US><br>
  &nbsp;&nbsp;&nbsp;&nbsp;bool ret = ds.<span class=style81>login</span>(loginctx);//</span>登陆<span
  lang=EN-US>icoud</span>，成功返回<span lang=EN-US>true,</span>失败返回<span
  lang=EN-US>false;<br>
  &nbsp;&nbsp;&nbsp;&nbsp;if (ret == false)<br>
  &nbsp;&nbsp;&nbsp;&nbsp; {<br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return;<br>
  &nbsp;&nbsp;&nbsp;&nbsp; }</span></p>
  <p class=MsoNormal><span lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp; //</span>增加联系人<span
  lang=EN-US> <br>
  &nbsp;&nbsp;&nbsp;&nbsp;List&lt;Contact&gt; contacts = new
  List&lt;Contact&gt;();<br>
  &nbsp;&nbsp;&nbsp;&nbsp;Contact contact = new Contact { prefix =
  &quot;pre&quot;, firstName = &quot;aaa&quot;,<br>
  &nbsp;&nbsp;&nbsp;&nbsp;lastName = &quot;bbb&quot;, middleName =
  &quot;ccc&quot;,phoneticLastName = &quot;&quot;,<br>
  &nbsp;&nbsp;&nbsp;&nbsp;phoneticFirstName = &quot;Nicolas&quot;,suffix =
  &quot;suff&quot;,nickName = &quot;nickname&quot;,<br>
  &nbsp;&nbsp;&nbsp;&nbsp;jobTitle = &quot;jobTitle&quot;, department =
  &quot;systemSport&quot;, companyName = &quot;nd&quot;,<br>
  &nbsp;&nbsp;&nbsp;&nbsp;birthday = &quot;1999-01-01&quot;,notes = &quot;</span>测试添加一个完整的联系人<span
  lang=EN-US>&quot;<br>
  &nbsp;&nbsp;&nbsp;&nbsp;};<br>
  &nbsp;&nbsp;&nbsp;&nbsp;////</span>电话<span lang=EN-US><br>
  &nbsp;&nbsp;&nbsp;&nbsp;contact.phones = new List&lt;Phone&gt;();<br>
  &nbsp;&nbsp;&nbsp;&nbsp;Phone phone1 = new Phone { label = &quot;WORK&quot;,
  field = &quot;13635260966&quot; };<br>
  &nbsp;&nbsp;&nbsp;&nbsp;Phone phone2 = new Phone { label = &quot;HOME&quot;,
  field = &quot;059122321966&quot; };<br>
  &nbsp;&nbsp;&nbsp;&nbsp;Phone phone3 = new Phone { label =
  &quot;custum&quot;, field = &quot;15918726583&quot; };<br>
  &nbsp;&nbsp;&nbsp;&nbsp;contact.phones.Add(phone1);<br>
  &nbsp;&nbsp;&nbsp;&nbsp;contact.phones.Add(phone2);<br>
  &nbsp;&nbsp;&nbsp;&nbsp;contact.phones.Add(phone3);<br>
  <br>
  &nbsp;&nbsp;&nbsp;&nbsp;////</span>邮件<span lang=EN-US><br>
  &nbsp;&nbsp;&nbsp;&nbsp;contact.emailAddresses = new List&lt;EmailAdr&gt;();<br>
  &nbsp;&nbsp;&nbsp;&nbsp;EmailAdr emailAdr1 = new EmailAdr { label =
  &quot;WORK&quot;, field = &quot;test_1@yahoo.com.cn&quot;
  };&nbsp;&nbsp;&nbsp;&nbsp;<br>
  &nbsp;&nbsp;&nbsp;&nbsp;EmailAdr emailAdr2 = new EmailAdr { label =
  &quot;HOME&quot;, field = &quot;test_2@gmail.com&quot; };<br>
  &nbsp;&nbsp;&nbsp;&nbsp;EmailAdr emailAdr3 = new EmailAdr { label =
  &quot;custum&quot;, field = &quot;test_3@me.com&quot; };<br>
  &nbsp;&nbsp;&nbsp;&nbsp;contact.emailAddresses.Add(emailAdr1);<br>
  &nbsp;&nbsp;&nbsp;&nbsp;contact.emailAddresses.Add(emailAdr2);<br>
  &nbsp;&nbsp;&nbsp;&nbsp;contact.emailAddresses.Add(emailAdr3);<br>
  <br>
  &nbsp;&nbsp;&nbsp;&nbsp;////</span>地址<span lang=EN-US><br>
  &nbsp;&nbsp;&nbsp;&nbsp;contact.streetAddresses = new
  List&lt;StreetAdr&gt;();<br>
  &nbsp;&nbsp;&nbsp;&nbsp;<br>
  &nbsp;&nbsp;&nbsp;&nbsp;StreetField streetField1 = new StreetField();<br>
  &nbsp;&nbsp;&nbsp;&nbsp;streetField1.city = &quot;city</span><span lang=EN-US>&quot;;<br>
  &nbsp;&nbsp;&nbsp;&nbsp;streetField1.country = &quot;</span>country<span
  lang=EN-US>&quot;;<br>
  &nbsp;&nbsp;&nbsp;&nbsp;streetField1.state = &quot;</span>state<span lang=EN-US>&quot;;<br>
  &nbsp;&nbsp;&nbsp;&nbsp;streetField1.street = &quot;</span>street<span
  lang=EN-US>&quot;;<br>
  &nbsp;&nbsp;&nbsp;&nbsp;streetField1.countryCode = &quot;countryCode&quot;;<br>
  &nbsp;&nbsp;&nbsp;&nbsp;StreetAdr streetAdr1 = new StreetAdr { label =
  &quot;HOME&quot;, field = streetField1 };<br>
  <br>
  &nbsp;&nbsp;&nbsp;&nbsp;StreetField streetField2 = new StreetField();<br>
  <span lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;streetField1.city = &quot;city</span><span lang=EN-US>&quot;;<br>
&nbsp;&nbsp;&nbsp;&nbsp;streetField1.country = &quot;</span>country<span
  lang=EN-US>&quot;;<br>
&nbsp;&nbsp;&nbsp;&nbsp;streetField1.state = &quot;</span>state<span lang=EN-US>&quot;;<br>
&nbsp;&nbsp;&nbsp;&nbsp;streetField1.street = &quot;</span>street<span
  lang=EN-US>&quot;;<br>
&nbsp;&nbsp;&nbsp;&nbsp;streetField1.countryCode = &quot;countryCode&quot;;</span></span><span
  lang=EN-US><br>
  &nbsp;&nbsp;&nbsp;&nbsp;StreetAdr streetAdr2 = new StreetAdr { label =
  &quot;WORK&quot;, field = streetField2 };<br>
  <br>
  &nbsp;&nbsp;&nbsp;&nbsp;StreetField streetField3 = new StreetField();<br>
  <span lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;streetField1.city = &quot;city</span><span lang=EN-US>&quot;;<br>
&nbsp;&nbsp;&nbsp;&nbsp;streetField1.country = &quot;</span>country<span
  lang=EN-US>&quot;;<br>
&nbsp;&nbsp;&nbsp;&nbsp;streetField1.state = &quot;</span>state<span lang=EN-US>&quot;;<br>
&nbsp;&nbsp;&nbsp;&nbsp;streetField1.street = &quot;</span>street<span
  lang=EN-US>&quot;;<br>
&nbsp;&nbsp;&nbsp;&nbsp;streetField1.countryCode = &quot;countryCode&quot;;</span></span><span
  lang=EN-US><br>
  &nbsp;&nbsp;&nbsp;&nbsp;StreetAdr streetAdr3 = new StreetAdr { label =
  &quot;custum&quot;, field = streetField3 };<br>
  &nbsp;&nbsp;&nbsp;&nbsp;contact.streetAddresses.Add(streetAdr1);<br>
  &nbsp;&nbsp;&nbsp;&nbsp;contact.streetAddresses.Add(streetAdr2);<br>
  &nbsp;&nbsp;&nbsp;&nbsp;contact.streetAddresses.Add(streetAdr3);<br>
  <br>
  &nbsp;&nbsp;&nbsp;&nbsp;////</span>主页<span lang=EN-US><br>
  &nbsp;&nbsp;&nbsp;&nbsp;contact.urls = new List&lt;Url&gt;();<br>
  &nbsp;&nbsp;&nbsp;&nbsp;Url url1 = new Url { label = &quot;WORK&quot;, field
  = &quot;www.sina.com&quot; };<br>
  &nbsp;&nbsp;&nbsp;&nbsp;Url url2 = new Url { label = &quot;HOME&quot;, field
  = &quot;www.apple.com&quot; };<br>
  &nbsp;&nbsp;&nbsp;&nbsp;Url url3 = new Url { label = &quot;custum&quot;,
  field = &quot;www.google.com&quot; };<br>
  &nbsp;&nbsp;&nbsp;&nbsp;contact.urls.Add(url1);<br>
  &nbsp;&nbsp;&nbsp;&nbsp;contact.urls.Add(url2);<br>
  &nbsp;&nbsp;&nbsp;&nbsp;contact.urls.Add(url3);<br>
  <br>
  &nbsp;&nbsp;&nbsp;&nbsp;////</span>概况<span lang=EN-US><br>
  &nbsp;&nbsp;&nbsp;&nbsp;contact.profiles = new List&lt;Profile&gt;();<br>
  &nbsp;&nbsp;&nbsp;&nbsp;Profile profile1 = new Profile { label =
  &quot;Facebook&quot;, field = &quot;http://twitter.com&quot;,user =
  &quot;sdfdf&quot; }; <br>
  &nbsp;&nbsp;&nbsp;&nbsp;Profile profile2 = new Profile { label =
  &quot;custum&quot;, field = &quot;http://facebook.com&quot;,user =
  &quot;jjjjjj&quot; };<br>
  &nbsp;&nbsp;&nbsp;&nbsp;contact.profiles.Add(profile1);<br>
  &nbsp;&nbsp;&nbsp;&nbsp;contact.profiles.Add(profile2);<br>
  <br>
  &nbsp;&nbsp;&nbsp;&nbsp;////</span>日期<span lang=EN-US><br>
  &nbsp;&nbsp;&nbsp;&nbsp;contact.dates = new List&lt;Date&gt;();<br>
  &nbsp;&nbsp;&nbsp;&nbsp;Date date1 = new Date { label = &quot;other&quot;,
  field = &quot;2011-01-01&quot; };<br>
  &nbsp;&nbsp;&nbsp;&nbsp;Date date2 = new Date { label = &quot;custum&quot;,
  field = &quot;2012-01-01&quot; };<br>
  &nbsp;&nbsp;&nbsp;&nbsp;contact.dates.Add(date1);<br>
  &nbsp;&nbsp;&nbsp;&nbsp;contact.dates.Add(date2);<br>
  <br>
  &nbsp;&nbsp;&nbsp;&nbsp;////</span>相关人<span lang=EN-US><br>
  &nbsp;&nbsp;&nbsp;&nbsp;contact.relatedNames = new List&lt;RelatedName&gt;();<br>
  &nbsp;&nbsp;&nbsp;&nbsp;RelatedName relatedName1 = new RelatedName { label =
  &quot;other&quot;, field = &quot;father&quot; };<br>
  &nbsp;&nbsp;&nbsp;&nbsp;RelatedName relatedName2 = new RelatedName { label =
  &quot;custum&quot;, field = &quot;brother&quot; };<br>
  &nbsp;&nbsp;&nbsp;&nbsp;contact.relatedNames.Add(relatedName1);<br>
  &nbsp;&nbsp;&nbsp;&nbsp;contact.relatedNames.Add(relatedName2);<br>
  <br>
  &nbsp;&nbsp;&nbsp;&nbsp;////</span>通讯<span lang=EN-US><br>
  &nbsp;&nbsp;&nbsp;&nbsp;contact.IMs = new List&lt;IM&gt;();<br>
  <br>
  &nbsp;&nbsp;&nbsp;&nbsp;IMsfield iMsfield1 = new IMsfield();<br>
  &nbsp;&nbsp;&nbsp;&nbsp;iMsfield1.IMService = &quot;QQ&quot;;<br>
  &nbsp;&nbsp;&nbsp;&nbsp;iMsfield1.userName = &quot;qqusername&quot;;<br>
  &nbsp;&nbsp;&nbsp;&nbsp;IMsfield iMsfield2 = new IMsfield();<br>
  &nbsp;&nbsp;&nbsp;&nbsp;iMsfield2.IMService = &quot;Facebook&quot;;<br>
  &nbsp;&nbsp;&nbsp;&nbsp;iMsfield2.userName = &quot;testname&quot;;<br>
  <br>
  &nbsp;&nbsp;&nbsp;&nbsp;IM iMs1 = new IM { label = &quot;QQ&quot;, field =
  iMsfield1 };<br>
  &nbsp;&nbsp;&nbsp;&nbsp;IM iMs2 = new IM { label = &quot;weibo&quot;, field =
  iMsfield2 };<br>
  &nbsp;&nbsp;&nbsp;&nbsp;contact.IMs.Add(iMs1);<br>
  &nbsp;&nbsp;&nbsp;&nbsp;contact.IMs.Add(iMs2);<br>
  <br>
  &nbsp;&nbsp;&nbsp;&nbsp;contacts.Add(contact);<br>
  &nbsp;&nbsp;&nbsp;&nbsp;Context ctx = new Context(); <br>
  &nbsp;&nbsp;&nbsp;&nbsp;ctx.modeType = Context.ICLOUD_CONTACT_MODE;<br>
  &nbsp;&nbsp;&nbsp;&nbsp;ctx.contactList = contacts;<br>
  &nbsp;&nbsp;&nbsp;&nbsp;ds.<span class=style81>put</span>(ctx);</span></p>
  <p><span lang=EN-US>}</span></p>
  </td>
 </tr>
 <tr style='mso-yfti-irow:8'>
  <td style='padding:.75pt .75pt .75pt .75pt'>
  <p><strong><span lang=EN-US style='font-family:宋体;mso-bidi-font-family:宋体'>8.</span></strong><strong><span
  style='font-family:宋体;mso-bidi-font-family:宋体'>修改联系人</span></strong></p>
  <p><span lang=EN-US>using DataSync;</span></p>
  <p><span lang=EN-US>static void Main()<br>
  {</span></p>
  <p><span lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;DataSyncObject ds = new
  DataSyncObject();//</span>创建<span lang=EN-US>DataSyncObject</span>对像<span
  lang=EN-US><br>
  &nbsp;&nbsp;&nbsp;&nbsp;ds.gIcloud = new Cloud();//</span>生成<span lang=EN-US>gIcloud</span>对像</p>
  <p><span lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;Context loginctx = new
  Context();//</span>生成<span lang=EN-US>Context</span>对像<span lang=EN-US><br>
  &nbsp;&nbsp;&nbsp;&nbsp;loginctx.loginUsername = &quot;apple id &quot;;//</span>输入<span
  lang=EN-US>icoud </span>帐号<span lang=EN-US> <br>
  &nbsp;&nbsp;&nbsp;&nbsp;loginctx.loginPassword = &quot;password&quot;;//</span>输入<span
  lang=EN-US>icoud </span>帐号密码<span lang=EN-US> <br>
  &nbsp;&nbsp;&nbsp;&nbsp;loginctx.modeType = Context.ICLOUD_MODE;//</span>输入<span
  lang=EN-US>Context</span>参数的模块类型，当前设为登陆到<span lang=EN-US>icloud</span>服务器上<span
  lang=EN-US><br>
  &nbsp;&nbsp;&nbsp;&nbsp;bool ret = ds.<span class=style81>login</span>(loginctx);//</span>登陆<span
  lang=EN-US>icoud</span>，成功返回<span lang=EN-US>true,</span>失败返回<span
  lang=EN-US>false;<br>
  &nbsp;&nbsp;&nbsp;&nbsp;if (ret == false)<br>
  &nbsp;&nbsp;&nbsp;&nbsp; {<br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return;<br>
  &nbsp;&nbsp;&nbsp;&nbsp; }</span></p>
  <p><span lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;//</span>修改联系人<span lang=EN-US><br>
&nbsp;&nbsp;&nbsp;&nbsp;Context ctx = new Context();<br>
&nbsp;&nbsp;&nbsp;&nbsp;ctx.modeType = Context.ICLOUD_CONTACT_MODE;<br>
&nbsp;&nbsp;&nbsp;&nbsp;ds.get(ctx);<br>
&nbsp;&nbsp;&nbsp;&nbsp;List&lt;Contact&gt; contactList = ctx.outContactList;<br>
&nbsp;&nbsp;&nbsp;&nbsp;List&lt;Contact&gt; contacts = new List&lt;Contact&gt;();
<br>
&nbsp;&nbsp;&nbsp;&nbsp;Contact contact = contactList[0]; <br>
&nbsp;&nbsp;&nbsp;&nbsp;contact.firstName = &quot;aaa&quot;;<br>
&nbsp;&nbsp;&nbsp;&nbsp;contact.lastName = &quot;bbb&quot;;<br>
&nbsp;&nbsp;&nbsp;&nbsp;contact.phones = new List&lt;Phone&gt;();<br>
&nbsp;&nbsp;&nbsp;&nbsp;Phone phone = new Phone { label = &quot;WORK&quot;, field = &quot;987654321&quot; };<br>
&nbsp;&nbsp;&nbsp;&nbsp;contact.phones.Add(phone);<br>
&nbsp;&nbsp;&nbsp;&nbsp;contacts.Add(contact); 
<br>
&nbsp;&nbsp;&nbsp;&nbsp;Context ctx = new Context(); <br>
&nbsp;&nbsp;&nbsp;&nbsp;ctx.modeType = Context.ICLOUD_CONTACT_MODE;<br>
&nbsp;&nbsp;&nbsp;&nbsp;ctx.contactList = contacts;<br>
&nbsp;&nbsp;&nbsp;&nbsp;ds.updata(ctx);</span></p>
  <p><span lang=EN-US>}</span></p>
  </td>
 </tr>
 <tr style='mso-yfti-irow:9;mso-yfti-lastrow:yes'>
  <td style='padding:.75pt .75pt .75pt .75pt'>
  <p><strong><span lang=EN-US style='font-family:宋体;mso-bidi-font-family:宋体'>9.</span></strong><strong><span
  style='font-family:宋体;mso-bidi-font-family:宋体'>删除指定联系人</span></strong></p>
  <p><span lang=EN-US>using DataSync;</span></p>
  <p><span lang=EN-US>static void Main()<br>
  {</span></p>
  <p><span lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;DataSyncObject ds = new
  DataSyncObject();//</span>创建<span lang=EN-US>DataSyncObject</span>对像<span
  lang=EN-US><br>
  &nbsp;&nbsp;&nbsp;&nbsp;ds.gIcloud = new Cloud();//</span>生成<span lang=EN-US>gIcloud</span>对像</p>
  <p><span lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;Context loginctx = new
  Context();//</span>生成<span lang=EN-US>Context</span>对像<span lang=EN-US><br>
  &nbsp;&nbsp;&nbsp;&nbsp;loginctx.loginUsername = &quot;apple id &quot;;//</span>输入<span
  lang=EN-US>icoud </span>帐号<span lang=EN-US> <br>
  &nbsp;&nbsp;&nbsp;&nbsp;loginctx.loginPassword = &quot;password&quot;;//</span>输入<span
  lang=EN-US>icoud </span>帐号密码<span lang=EN-US> <br>
  &nbsp;&nbsp;&nbsp;&nbsp;loginctx.modeType = Context.ICLOUD_MODE;//</span>输入<span
  lang=EN-US>Context</span>参数的模块类型，当前设为登陆到<span lang=EN-US>icloud</span>服务器上<span
  lang=EN-US><br>
  &nbsp;&nbsp;&nbsp;&nbsp;bool ret = ds.<span class=style81>login</span>(loginctx);//</span>登陆<span
  lang=EN-US>icoud</span>，成功返回<span lang=EN-US>true,</span>失败返回<span
  lang=EN-US>false;<br>
  &nbsp;&nbsp;&nbsp;&nbsp;if (ret == false)<br>
  &nbsp;&nbsp;&nbsp;&nbsp; {<br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return;<br>
  &nbsp;&nbsp;&nbsp;&nbsp; }</span></p>
  <p class=MsoNormal><span lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;//</span>删除联系人<span
  lang=EN-US><br>
&nbsp;&nbsp;&nbsp;&nbsp;Context ctx = new Context();<br>
&nbsp;&nbsp;&nbsp;&nbsp;ctx.modeType = Context.ICLOUD_CONTACT_MODE;<br>
&nbsp;&nbsp;&nbsp;&nbsp;ds.get(ctx);<br>
&nbsp;&nbsp;&nbsp;&nbsp;List&lt;Contact&gt; contactList = ctx.outContactList;<br>
&nbsp;&nbsp;&nbsp;&nbsp;List&lt;Contact&gt; delContacts = new List&lt;Contact&gt;();<br>
&nbsp;&nbsp;&nbsp;&nbsp;Phone phone = new Phone { label = &quot;WORK&quot;, field = &quot;15935260966&quot; };<br>
&nbsp;&nbsp;&nbsp;&nbsp;Contact contact = contactList[0];<br>
&nbsp;&nbsp;&nbsp;&nbsp;delContacts.Add(contact);<br>
&nbsp;&nbsp;&nbsp;&nbsp;Context ctx = new Context(); <br>
&nbsp;&nbsp;&nbsp;&nbsp;ctx.modeType = Context.ICLOUD_CONTACT_MODE;<br>
&nbsp;&nbsp;&nbsp;&nbsp;ctx.contactList = delContacts;<br>
&nbsp;&nbsp;&nbsp;&nbsp;ds.delete(ctx);</span></p>
  <p><span lang=EN-US>}</span></p>
  </td>
 </tr>
</table>

<p><span lang=EN-US>&nbsp;</span></p>

</div>

</body>

</html>
